package cn.itsource.mapper.blog;

import cn.itsource.blog.domain.article.Article;
import cn.itsource.blog.domain.article.ArticleDto;
import cn.itsource.blog.domain.article.CountTime;
import cn.itsource.blog.domain.article.DivTime;
import cn.itsource.blog.query.article.ArticleQuery;
import cn.itsource.head.ColPic;
import cn.itsource.head.PiePic;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ArticleMapper {
    List<Article> selectAll();

    void delete(Integer id);

    void update(Article article);

    void add(Article article);

    void deleteMore(Long[] ids);

    List <Article> queryArticle(ArticleQuery articleQuery);

    /*List<ArticleDto> countByArticleType();*/

    List<ArticleDto> selectDto();

    List<CountTime> selectTime();

    List<DivTime> selectDiv(CountTime countTime);

    List<PiePic> selectPie();

    List<ColPic> selectCol();

    Article selectOne(Integer id);

    Article selectDepend(Integer id);

    Article get(Integer id);

    void readUp(Article article);
}
